namespace TXLooker.WorkItemExtention.WIQL
{
    using System;
    using System.Reflection;

    public abstract class NodeList : Node
    {
        private Node[] m_array;

        protected NodeList(NodeType type, int count) : base(type)
        {
            this.m_array = new Node[count];
        }

        public override string ToString()
        {
            return base.JoinChildren(", ");
        }

        public override int Count
        {
            get
            {
                return this.m_array.Length;
            }
        }

        public override DataType DataType
        {
            get
            {
                return base.GetChildrenDataType();
            }
        }

        public override bool IsConst
        {
            get
            {
                return base.GetChildrenIsConst();
            }
        }

        public override bool IsScalar
        {
            get
            {
                return false;
            }
        }

        public override Node this[int i]
        {
            get
            {
                return this.m_array[i];
            }
            set
            {
                this.m_array[i] = value;
            }
        }
    }
}

